package com.hpp.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hpp.model.SysRole;
import com.hpp.persistence.SysRoleMapper;
import com.hpp.service.IRoleService;

@Service
public class RoleServiceImpl implements IRoleService {
	
	@Autowired
	SysRoleMapper sysRoleMapper;

	@Override
	public List<SysRole> getSysRoleList(HashMap<String, Object> map) {
		return sysRoleMapper.getSysRoleList(map);
	}

	@Override
	public int addSysRole(SysRole role) {
		return sysRoleMapper.insertSelective(role);
	}

	@Override
	public int updateSysRole(SysRole role) {
		return sysRoleMapper.updateByPrimaryKeySelective(role);
	}

	@Override
	public SysRole getSysRole(HashMap<String, Object> map) {
		return sysRoleMapper.getSysRole(map);
	}

	@Override
	public int deleteSysRole(HashMap<String, Object> map) {
		return sysRoleMapper.deleteSysRole(map);
	}

}
